package itheima.com.zuoye.d02;

public class Test {
    public static void main(String[] args) {
//        分别创建三个不同动物的对象，并给对象中的属性赋值，最后分别调用类中的吃饭和技能方法，在控制台打印结果。
        Animals dog = new Dog("哈士奇", "白色", "小哈", 2);
        dog.eat();
        Dog d = (Dog) dog;
        d.lookHome();

        Animals hedgehog = new Hedgehog("小刺猬", "黑色", "小刺", 1);
        hedgehog.eat();
        Hedgehog h = (Hedgehog) hedgehog;
        h.actingCute();

        Animals cat = new Cat("小猫", "黑色", "小猫", 1);
        cat.eat();
        Cat c = (Cat) cat;
        c.catchMouse();
    }
}
